$OpenBSD: patch-Src_crypto_c,v 1.1 2014/04/14 20:53:58 naddy Exp $
--- Src/crypto.c.orig	Sun Nov  9 12:12:02 2003
+++ Src/crypto.c	Mon Apr 14 21:39:34 2014
@@ -374,23 +374,23 @@ int pk_encrypt(BUFFER *in, BUFFER *keybuf)
 
 int buf_crypt(BUFFER *buf, BUFFER *key, BUFFER *iv, int enc)
 {
-  des_key_schedule ks1;
-  des_key_schedule ks2;
-  des_key_schedule ks3;
-  des_cblock i;
+  DES_key_schedule ks1;
+  DES_key_schedule ks2;
+  DES_key_schedule ks3;
+  DES_cblock i;
 
   assert(enc == ENCRYPT || enc == DECRYPT);
   assert((key->length == 16 || key->length == 24) && iv->length == 8);
   assert(buf->length % 8 == 0);
 
   memcpy(i, iv->data, 8);	/* leave iv buffer unchanged */
-  des_set_key((const_des_cblock *) key->data, ks1);
-  des_set_key((const_des_cblock *) (key->data + 8), ks2);
+  DES_set_key((const_DES_cblock *) key->data, &ks1);
+  DES_set_key((const_DES_cblock *) (key->data + 8), &ks2);
   if (key->length == 16)
-    des_set_key((const_des_cblock *) key->data, ks3);
+    DES_set_key((const_DES_cblock *) key->data, &ks3);
   else
-    des_set_key((const_des_cblock *) (key->data + 16), ks3);
-  des_ede3_cbc_encrypt(buf->data, buf->data, buf->length, ks1, ks2, ks3,
+    DES_set_key((const_DES_cblock *) (key->data + 16), &ks3);
+  DES_ede3_cbc_encrypt(buf->data, buf->data, buf->length, &ks1, &ks2, &ks3,
 		       &i, enc);
   return (0);
 }
@@ -398,18 +398,18 @@ int buf_crypt(BUFFER *buf, BUFFER *key, BUFFER *iv, in
 int buf_3descrypt(BUFFER *buf, BUFFER *key, BUFFER *iv, int enc)
 {
   int n = 0;
-  des_key_schedule ks1;
-  des_key_schedule ks2;
-  des_key_schedule ks3;
+  DES_key_schedule ks1;
+  DES_key_schedule ks2;
+  DES_key_schedule ks3;
 
   assert(enc == ENCRYPT || enc == DECRYPT);
   assert(key->length == 24 && iv->length == 8);
 
-  des_set_key((const_des_cblock *) key->data, ks1);
-  des_set_key((const_des_cblock *) (key->data + 8), ks2);
-  des_set_key((const_des_cblock *) (key->data + 16), ks3);
-  des_ede3_cfb64_encrypt(buf->data, buf->data, buf->length, ks1, ks2, ks3,
-			(des_cblock *) iv->data, &n, enc);
+  DES_set_key((const_DES_cblock *) key->data, &ks1);
+  DES_set_key((const_DES_cblock *) (key->data + 8), &ks2);
+  DES_set_key((const_DES_cblock *) (key->data + 16), &ks3);
+  DES_ede3_cfb64_encrypt(buf->data, buf->data, buf->length, &ks1, &ks2, &ks3,
+			(DES_cblock *) iv->data, &n, enc);
   return (0);
 }
 
